<?php
/**
 * Created by PhpStorm.
 * User: lining
 * Date: 2018/11/15
 * Time: 22:38
 */

namespace App\HttpController\Api;



use EasySwoole\Core\Http\AbstractInterface\Controller;

class Base extends Controller
{
    public function index ()
    {
        // TODO: Implement index() method.
    }

    public function onRequest ($action): ?bool
    {
//        $this->writeJson(403,'无权限',[]);
        return true;
    }
    public function onException (\Throwable $throwable, $actionName): void
    {
//        parent ::onException($throwable, $actionName); // TODO: Change the autogenerated stub
        $this->writeJson(400,'请求不合法',[]);
    }
}